package com.tarena.demo.luban.all.main.mapper;

import com.tarena.demo.luban.protocol.cart.dos.CartDO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.springframework.stereotype.Repository;

@Repository
public interface CartMapper {

    @Insert("insert into cart_tbl(product_code,user_id,count,price) values(#{productCode},#{userId},#{count},#{price})")
    int insert(CartDO cartDO);

    @Delete("delete from cart_tbl where user_id=#{userId} and product_code=#{productCode}")
    int delete(CartDO cartDO);

}
